﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RangeExample.aspx.cs" Inherits="Examples_Validations_RangeExample" %>
<%@ Register TagPrefix="mobile"
    Namespace="System.Web.UI.MobileControls"
    Assembly="System.Web.Mobile" %>
   
<mobile:Form id="Form1" runat="server">
    <mobile:Label runat="server">
        Date of birth:
    </mobile:Label>
    <mobile:TextBox id="dob" runat="server"></mobile:TextBox>
    <mobile:RangeValidator id="RangeValidator1" runat="server"
        MinimumValue="01/01/1900"
        ControlToValidate="dob"
        ErrorMessage="Sorry, you are not 21.">
    </mobile:RangeValidator>
    <mobile:Command id="Command1" runat="server" text="Submit">
    </mobile:Command>
</mobile:Form>
   
<mobile:Form id="Form2" runat="server">
    <mobile:Label id="Label2" runat="server">
        Welcome, you are over 21.
    </mobile:Label>
</mobile:Form>